home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / IBM VisualAge for Java Enterprise v4.0 Retail / ivj40 / setup / IDE.Cab / F77776_VAJavaSmartGuideButtonsUI.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-04-25  |  2.1 KB  |  54 lines

  1. package com.ibm.ivb.sguides.vajava;
  2.  
  3. import com.ibm.ivb.sguides.MultiCellContainer;
  4. import com.ibm.ivb.sguides.SmartGuideButtons;
  5. import com.ibm.ivb.sguides.basic.BasicSmartGuideButtonsUI;
  6. import java.awt.Component;
  7. import java.awt.Graphics;
  8. import javax.swing.JComponent;
  9. import javax.swing.plaf.ComponentUI;
  10.  
  11. public class VAJavaSmartGuideButtonsUI extends BasicSmartGuideButtonsUI {
  12.    private static final String kCBIBMCopyright = "(c) Copyright IBM Corporation 1998";
  13.  
  14.    public static ComponentUI createUI(JComponent var0) {
  15.       return new VAJavaSmartGuideButtonsUI();
  16.    }
  17.  
  18.    public void installUI(JComponent var1) {
  19.       super.sgbuttons = (SmartGuideButtons)var1;
  20.       super.sgbuttons.setHelpAvailable(false);
  21.       super.makeButtons(0, true);
  22.       MultiCellContainer var2 = new MultiCellContainer();
  23.       var2.setPadding(2, 0);
  24.       var2.setFill(1);
  25.       var2.setWeight(1, 1);
  26.       var2.setInsets(3, 10, 6, 8);
  27.       var2.addToCell(super.sgbuttons.infoLabel, 0, 0);
  28.       var2.setFill(3);
  29.       var2.setAnchor(13);
  30.       var2.setWeight(0, 1);
  31.       var2.setInsets(3, 0, 6, 8);
  32.       var2.addToCell(super.sgbuttons.cancelButton, 1, 0);
  33.       var2.setInsets(3, 0, 6, 0);
  34.       var2.addToCell(super.sgbuttons.backButton, 2, 0);
  35.       var2.addToCell(super.sgbuttons.nextButton, 3, 0);
  36.       var2.setInsets(3, 8, 6, 8);
  37.       var2.addToCell(super.sgbuttons.finishButton, 4, 0);
  38.       super.sgbuttons.setWeight(1, 1);
  39.       super.sgbuttons.addToCell(var2, 0, 0);
  40.       ((BasicSmartGuideButtonsUI)this).installListeners();
  41.       super.sgbuttons.backButton.setOpaque(true);
  42.       super.sgbuttons.nextButton.setOpaque(true);
  43.       super.sgbuttons.finishButton.setOpaque(true);
  44.       super.sgbuttons.cancelButton.setOpaque(true);
  45.       super.sgbuttons.setBackground(VAJavaLookAndFeel.getCommonBackground());
  46.       ((JComponent)var2).setBackground(VAJavaLookAndFeel.getCommonBackground());
  47.    }
  48.  
  49.    public void paint(Graphics var1, JComponent var2) {
  50.       var1.setColor(((Component)var2).getBackground());
  51.       var1.fillRect(0, 0, var2.getWidth(), var2.getHeight());
  52.    }
  53. }
  54.